package com.caizi.base.http;

/*
 * @author 菜菜籽
 * @date 2025/2/16 08:59
 * @description: get请求
 */

import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;

@Component
public class HttpGet extends Http {

    public <T> ResponseEntity<T> request(String endpoint, Class<T> responseType) {
        String url = getBaseUrl() + endpoint;
        return getRestTemplate().getForEntity(url, responseType);
    }
}